<?php
include('common/constants.php');
include('common/msg_constants.php');
include('common/db.php');
session_start();

if (isset($_POST['txt_usrname'])) {
	$sql = "select * from `user` where `email`='{$_POST['txt_usrname']}'";
	//echo $sql;
	$result = mysql_query($sql) or trigger_error(mysql_error());
	$num_rows = mysql_num_rows($result);
	if($num_rows>0){
		echo "fail";
	}else{
		echo "success";
	}
}else{
	echo "nodata";
}